﻿<UserControl x:Class="Jok.Client.Portal.Views.LoginView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Height="143" Width="208">

    <Border BorderThickness="1" BorderBrush="#FFBDBDBD" CornerRadius="5">

        <Grid x:Name="LayoutRoot">
            <Grid DataContext="{Binding CurrPlayer}" Margin="0,0,0,0">
                <TextBox Margin="76,13,14,0" Text="{Binding Username, Mode=TwoWay}" VerticalAlignment="Top" TextWrapping="Wrap" Height="24"/>
                <TextBlock HorizontalAlignment="Left" Margin="10,17,0,0" VerticalAlignment="Top" Text="Username" TextWrapping="Wrap" Foreground="#FFFAF8F8"/>
                <TextBlock Margin="10,45,0,0" Text="Password" TextWrapping="Wrap" HorizontalAlignment="Left" Foreground="#FFFAF8F8" VerticalAlignment="Top"/>
                <CheckBox Margin="76,0,14,54" Content="save" Foreground="#FFECE6E6" VerticalAlignment="Bottom"/>
                <PasswordBox Margin="76,41,0,0"  Password="{Binding Password, Mode=TwoWay}" Height="24" VerticalAlignment="Top" HorizontalAlignment="Left" Width="116"/>
            </Grid>
            <Button Margin="23,0,37,26" Content="Login" VerticalAlignment="Bottom" Height="22" Command="{Binding LoginCommand}" />
            <Button Content="&gt;&gt;" Click="Registration_Click" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="25" Margin="0,0,8,26" FontSize="10" Height="22" ToolTipService.ToolTip="Registration" />
            <TextBlock Foreground="Red" HorizontalAlignment="Left" Margin="6,120,0,0" Text="Password is incorrect" TextWrapping="Wrap" VerticalAlignment="Top" Width="192" Visibility="{Binding IsAuthFailed}" />
        </Grid>

    </Border>
</UserControl>
